// pages/invitation/index.js
const app = getApp()
Page({

    /**
     * 页面的初始数据
     */
    data: {
        mainInfo: {
            he: "马悠然",
            she: "刘琛潇",
            he_tel: "18233213062",
            she_tel: "15100260455",
            date: "2018-09-15",
            lunar: "八月初六",
            hotel: "定兴县 九州隆泰酒店"
        }
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {
        return {
            title: app.globalData.shareData.share,
            imageUrl: app.globalData.shareData.thumb,
            path: 'pages/invitation/index',
            success: function (res) {
                wx.showToast({
                    title: '分享成功',
                })
            },
            fail: function (res) {
                // 转发失败
                wx.showToast({
                    title: '分享取消',
                })
            }
        }
    },
    callhe: function (event) {
        wx.makePhoneCall({
            phoneNumber: this.data.mainInfo.he_tel
        })
    },
    callshe: function (event) {
        wx.makePhoneCall({
            phoneNumber: this.data.mainInfo.she_tel
        })
    }
})
